﻿using System;
using System.Collections.ObjectModel;
using Monti.MVVM;

//using Monti.MVVM;

namespace Peter.Logic
{
   /// <summary>
   /// View model for the file explorer.
   /// </summary>
   public class FileExplorerViewModel : ViewModelBase
   {
      private string m_Title;
      private bool m_IsVisible;

      /// <summary>
      /// Initializes a new file explorer view model.
      /// </summary>
      public FileExplorerViewModel ()
      {
         this.Title = "File Explorer";
         this.BaseItems = new ObservableCollection <FileItemViewModel>
            {
               new FileItemViewModel (null, Environment.GetFolderPath (Environment.SpecialFolder.MyDocuments),
                                       "My Documents", true),
               new FileItemViewModel (null, Environment.GetFolderPath (Environment.SpecialFolder.Desktop),
                                       "Desktop", true)
            };
      }

      /// <summary>
      /// Gets or Sets the title for this content.
      /// </summary>
      public string Title
      {
         get { return this.m_Title; }
         set
         {
            if (this.m_Title != value)
            {
               this.m_Title = value;
               this.RaisePropertyChanged ("Title");
            }
         }
      }

      /// <summary>
      /// Gets or Sets a value indicating if this item is visible or not.
      /// </summary>
      public bool IsVisible
      {
         get { return this.m_IsVisible; }
         set
         {
            if (this.m_IsVisible != value)
            {
               this.m_IsVisible = value;
               this.RaisePropertyChanged ("IsVisible");
            }
         }
      }

      /// <summary>
      /// Gets the list of base items for the file view.
      /// </summary>
      public ObservableCollection <FileItemViewModel> BaseItems { get; private set; }
   }
}
